#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Author: Sky
Module Description: cross_contend ...
File: cross_contend.py
Date: 2020/04/01
"""


class CrossContendRoleMixin(object):
    __slots__ = ()
    _record = NotImplemented
    role_guid = NotImplemented
    activity_id = NotImplemented
    srv_id = NotImplemented

    def update_wisdom(self, val):
        """
        更新学识
        :param val:
        :return:
        """
        self._record.Wisdom = val
        from app.area.core.component_center import ComponentCenter
        # 更新榜单积分
        ComponentCenter().contend_result.update_role_rank_score(
            self.role_guid, self.srv_id, self.activity_id, self._record.Wisdom)
